<script lang="ts" setup>
import {onMounted, ref} from "vue";
import {registerMicroApps, start} from 'qiankun';

const microA = ref()
import {getMicroRoutes} from '../../router'

onMounted(() => {
    const microRouters = getMicroRoutes()
    const activeRule=microRouters.map(it=>it.path)
    registerMicroApps([
        {
            name: 'web_b', // app name registered
            entry: ' http://localhost:5174/',
            container: microA.value || '#microA',
            activeRule,
            props: {
                token: 'token888',
                microRouters,
            }
        }
    ]);

    start();
})
</script>

<template>
    <div id="microA" ref="microA">454</div>
</template>

<style scoped>
#microA {
position: relative;
    height: 100%;
}
</style>
